#include <QtCore/QCoreApplication>
#include <QProcess>
#include <QThread>
#include <QDebug>

extern "C"
{
#include <windows.h>
}

const QString clientFileName  = "client.exe";

int main(int argc, char *argv[])
{
	QCoreApplication a(argc, argv);

	while(true)
	{
		int exitCode = QProcess::execute(clientFileName);
		qDebug()<<"Client exit with code "<<exitCode;
		qDebug()<<"Restarting......";
	}

    return a.exec();
}
